package com.haishuibutian.rocketmqconsumer.rocketmq;

import com.alibaba.fastjson.JSON;

public interface MQConsumerHandler<T> {

    boolean handler(T message) throws Exception;

    Class<T> getClazz();

    default T transferMessage(String message) {
        return JSON.parseObject(message, getClazz());
    }
}
